//
//  CZAppearCritismController.swift
//  GZWeibo666
//
//  Created by 许建安 on 15/12/1.
//  Copyright © 2015年 itcast. All rights reserved.
//

import UIKit

class CZAppearCritismController: UIViewController {
    
    
    override func loadView() {
        view = CZCritismView(title: "评论")
        

    }

    override func viewDidLoad() {
        super.viewDidLoad()
        
        
        title = "评论"
        // 设置导航栏按钮
        navigationItem.leftBarButtonItem = UIBarButtonItem(title: "取消", style: UIBarButtonItemStyle.Plain, target: self, action: "cancelCritism")
        navigationItem.rightBarButtonItem = UIBarButtonItem(title: "发送", style: UIBarButtonItemStyle.Plain, target: self, action: "sendCritism")
        
    }
    
    ///取消
    func cancelCritism() {
        //返回上一个控制器
//        removeFromParentViewController()
        print("aa")
        dismissViewControllerAnimated(true) { () -> Void in
            print("完成")
        }
    }
    
    ///发送
    func sendCritism() {
        print("发送")
        
    }
    
    
    

//    private func prepareUI() {
//        
//        //添加子控件
//        views.addSubview(critismField)
//        
//        //添加约束
//        critismField.translatesAutoresizingMaskIntoConstraints = false
//        
//        //创造约束对象
//        critismField.ff_Fill(views)
//        
//        
//    }
//    
//    
//    
//
//    //MARK： - 懒加载
//    ///
//    private lazy var critismField: UITextField = {
//        let textField = UITextField()
//        
//        textField.backgroundColor = UIColor.brownColor()
//        textField.background = UIImage(named: "J_{4UW@G9NL2GXJQ8A@RS3V")
//        
//        return textField
//    }()
    
    
//    private lazy var views = UIView()

}
